import { createRouter, createWebHashHistory } from 'vue-router'


const routes = [
        // {
        //   path: '/',
        //   name: 'home',
        //   component: HomeView
        // },
        // {
        //   path: '/about',
        //   name: 'about',
        //   // route level code-splitting
        //   // this generates a separate chunk (about.[hash].js) for this route
        //   // which is lazy-loaded when the route is visited.
        //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
        // }
    ]
    // 创建路由实例
const router = createRouter({
        // 使用hash方式实现路由
        history: createWebHashHistory(),
        //配置路由规则
        routes
    })
    //导出路由

export default router